package com.example.iitematicviewer.api.login;

import com.alibaba.fastjson.JSONObject;
import com.example.iitematicviewer.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录公控制层
 */
@RequestMapping("/login")
@RestController
public class LoginController {

    @Autowired
    private LoginService service;

    @RequestMapping("/save")
    public ResultVO save(@RequestBody JSONObject param){
        ResultVO resultVO = new ResultVO();
        return service.save(param,resultVO);
    }

    @RequestMapping("/login")
    public ResultVO login(@RequestBody JSONObject param){
        ResultVO resultVO = new ResultVO();
        return service.login(param,resultVO);
    }

}
